import { isUnDef, isNull, isArray, isNumber } from '@/utils/is'

// antdv Config Provider
export function getConfigProvider() {
  function transformCellText({ text }) {
    if (isArray(text) || isNumber(text)) {
      return text
    } else if (isNull(text) || isUnDef(text)) {
      return '-'
    }
    return text || '-'
  }
  return {
    transformCellText
  }
}
